package com.xnyzc.lhy.common.penum.invoice;

import com.xnyzc.lhy.common.entity.PEnum;

/**
 * 账单状态
 */
public enum EInvoiceStatus implements PEnum<String> {
    opening("1", "开票中"),
    opened("2", "已开票"),
    reding("3", "冲红中"),
    invidi("4", "已作废"),
    openFail("5", "已驳回");

    String value;
    String desc;

    EInvoiceStatus(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public String getDesc() {
        return desc;
    }

    @Override
    public String getValue() {
        return value;
    }

    @Override
    public String toString() {
        return name();
    }

    @Override
    public String toChString() {
        return desc;
    }

    public String toMessage() {
        String errorMessage = this.value + "," + this.desc;
        return errorMessage;
    }
}
